package 抽象.练习;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/*
* 定义一个Employee类，该类包含:
* private 成员变量name,number,birthday,其中birthday, 为myDate类的对象，
* toString()方法输出对象的name,number和birthday
* */
@NoArgsConstructor
@Setter
@Getter
public abstract class Employee {
    private String name;
    private int number;
    private MyDate birthday;
    public Employee(String name, int number, MyDate birthday) {
        this.name = name;
        this.number = number;
        this.birthday = birthday;
    }
    public abstract double  earning();
    @Override
    public String toString(){
        return "Employee=[name+"+name+",number="+number+",birthday"+birthday.toDateString();
    }

}
